import { View } from "../../../mvc/core/View";
import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { GTextFormat } from "../../../common/GTextFormat";
import { Language } from "../../../../extend/language/Language";
import { GTileList } from "../../../../com/mui/controls/GTileList";
import { ScrollBarDirection } from "../../../../fl/controls/ScrollBarDirection";
import { DramaLotteryHistoryRender } from "./DramaLotteryHistoryRender";
import { DataProvider } from "../../../../fl/data/DataProvider";
//class DramaLotteryProfilePanel
    
    export  class DramaLotteryProfilePanel extends View
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc1=ObjCreate.createBg(0, 0, 195, 25, this, ImagesConst.TileBg);
            var loc2=new GTextFormat("", 15, 15788607);
            var loc3=ObjCreate.createGTextField(Language.getString(70671), 52, 5, 100, 25, this, loc2);
            this._tileList = new GTileList();
            this._tileList.setSize(195, 170);
            this._tileList.columnWidth = 190;
            this._tileList.rowHeight = 20;
            this._tileList.direction = ScrollBarDirection.VERTICAL;
            this._tileList.horizontalGap = 0;
            this._tileList.verticalGap = 0;
            this._tileList.styleName = "TileList";
            this._tileList.setStyle("skin", new Object /* flash.display.Bitmap */());
            this._tileList.setStyle("cellRenderer", DramaLotteryHistoryRender);
            this._tileList.move(0, 26);
            addChild(this._tileList);
            return;
        }

        public /* override */ update(arg1: Object, ... rest): void
        {
            var loc1=arg1 as Array<any>;
            this._tileList.dataProvider = new DataProvider(loc1);
            this._tileList.drawNow();
            this._tileList.verticalScrollPosition = this._tileList.maxVerticalScrollPosition;
            return;
        }

        /* internal */ /* var */_tileList: GTileList;

        /* internal */ /* var */_dataProvider: DataProvider;
    }
